package com.second.mapper;

import com.second.model.pojo.FCommentZan;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * 本接口用来演示:
 *
 * @author: MuTing
 * @createTime: 2022-05-16 08:30
 **/
@Repository
public interface FCommentZanMapper extends JpaRepository<FCommentZan ,Integer> {

    /**
     * 根据评论ID统计点赞数
     * @param commentId
     * @param status
     * @return
     */
    int countByCommentIdAndStatus(Integer commentId,Integer status);

    int countByUserIdAndStatus(Integer userId,Integer status);

    FCommentZan getByUserIdAndCommentId(Integer userId,Integer commentId);

}
